﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;

namespace Ongoal.Quotation
{
    /// <summary>
    /// Token相关操作
    /// </summary>
    public interface IAuthentication
    {
        /// <summary>
        /// 获取Token
        /// </summary>
        /// <param name="ClimList"></param>
        /// <returns></returns>
        string GetToken(List<Claim> ClimList);

        /// <summary>
        /// 生成刷新Token
        /// </summary>
        /// <param name="ClimList"></param>
        /// <returns></returns>
        string GetRefreshToken(List<Claim> ClimList);

        /// <summary>
        /// 验证Token
        /// </summary>
        /// <param name="Token"></param>
        /// <param name="Clims"></param>
        /// <returns></returns>
        bool ValidateToken(string Token, out List<Claim> Clims);

        /// <summary>
        /// 根据Token获取Claim
        /// </summary>
        /// <param name="Token"></param>
        /// <returns></returns>

        List<Claim> GetClaims(string Token);
    }
}
